<?php
  require_once '../functions.php';
 
  /**
   * 根据客户端传递过来的ID删除对应数据
   */
  if(empty($_GET['id'])){
    exit('数据异常');
  }
  
  $id = $_GET['id'];
  
  // var_dump($id);
  $row = xiu_execute("delete from posts where id in ({$id});");
  
  header("Location: {$_SERVER['HTTP_REFERER']}");
?>